import 'package:flutter/material.dart';
import 'package:flutter_douban/config/app_colors.dart';
import 'package:flutter_douban/model/store_category_model.dart';
import 'package:flutter_douban/tool_views/cached_network_Image.dart';

class StoreShopHeaderView extends StatefulWidget {
  final StoreCategoryModel model;
  const StoreShopHeaderView({Key? key, required this.model}) : super(key: key);

  @override
  _StoreShopHeaderViewState createState() => _StoreShopHeaderViewState();
}

class _StoreShopHeaderViewState extends State<StoreShopHeaderView> {
  @override
  Widget build(BuildContext context) {
    return Container(
      color: Colors.white,
      child: Column(
        children: [
          SizedBox(
            height: 30,
          ),
          CachedImage(url: widget.model.l!, width: 70, height: 70),
          SizedBox(
            height: 15,
          ),
          Text(
            widget.model.n!,
            style: TextStyle(fontSize: 16, color: Colors.black),
          ),
          SizedBox(
            height: 20,
          ),
          Container(
            width: MediaQuery.of(context).size.width,
            height: 1,
            color: AppColors.page,
          ),
          Container(
            height: 45,
            child: Row(
              mainAxisAlignment: MainAxisAlignment.center,
              children: [
                Image.asset(
                  'assets/images/common/button_image_phone@2x.png',
                  width: 18,
                  height: 18,
                ),
                Text(
                  ' ${widget.model.mbi!}',
                  style: TextStyle(fontSize: 15, color: Colors.black),
                ),
              ],
            ),
          ),
          Container(
            width: MediaQuery.of(context).size.width,
            height: 1,
            color: AppColors.page,
          ),
          Container(
            height: 55,
            color: Colors.white,
            child: Row(
              mainAxisAlignment: MainAxisAlignment.start,
              children: [
                Container(
                  margin: EdgeInsets.only(left: 15),
                  height: 18,
                  width: 28,
                  alignment: Alignment.center,
                  decoration: BoxDecoration(
                    color: AppColors.yellow,
                    border: new Border.all(color: AppColors.yellow, width: 1),
                    borderRadius: BorderRadius.circular(3),
                  ),
                  child: Text(
                    '包邮',
                    style: TextStyle(fontSize: 11, color: AppColors.black),
                  ),
                ),
                SizedBox(width: 5,),
                Text(
                  ' ${widget.model.spp!}',
                  style: TextStyle(fontSize: 15, color: AppColors.black),
                ),
              ],
            ),
          ),
        ],
      ),
    );
  }
}
